// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'FaultID',
        footer: "Foots",
        cnName: '设备基础故障维护表',
        name: 'equipmentfaultmaintenanceview',
        newTabEdit: false,
        url: "/equipmentfaultmaintenanceview/",
        sortName: "FaultID"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"SerialNo":"","EquipmentName":"","EquipmentID":"","FieldName":"","Tag":"","FieldValue":"","Level":"","FaultReason":"","Resolution":"","Memo":""};
    const editFormOptions = [[{"title":"设备编码","required":true,"field":"SerialNo","type":"selectTable"},
                               {"title":"设备名称","field":"EquipmentName","disabled":true},
                               {"title":"设备ID（外键关联设备表）","required":true,"field":"EquipmentID","disabled":true},
                               {"title":"采集字段名称","field":"FieldName"}],
                              [{"title":"字段标识","required":true,"field":"Tag","type":"number"},
                               {"title":"二进制采集值","required":true,"field":"FieldValue","type":"number"},
                               {"dataKey":"levelGroup","data":[],"title":"故障等级","required":true,"field":"Level","type":"select"}],
                              [{"title":"故障原因","required":true,"field":"FaultReason","colSize":12}],
                              [{"title":"故障解决措施","required":true,"field":"Resolution","colSize":12}],
                              [{"title":"备注","field":"Memo","colSize":12}]];
    const searchFormFields = {"SerialNo":"","FaultReason":"","UpdateTime":[null,null]};
    const searchFormOptions = [[{"title":"设备编码","field":"SerialNo"},{"title":"故障原因","field":"FaultReason"},{"title":"更新时间","field":"UpdateTime","type":"range"}]];
    const columns = [{field:'FaultID',title:'故障维护唯一标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'SerialNo',title:'设备编码',type:'string',width:120,require:true,align:'left'},
                       {field:'EquipmentName',title:'设备名称',type:'string',width:180,readonly:true,align:'left'},
                       {field:'EquipmentID',title:'设备ID（外键关联设备表）',type:'string',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'FieldName',title:'采集字段名称',type:'string',width:120,align:'left'},
                       {field:'Tag',title:'字段标识',type:'int',width:110,require:true,align:'left'},
                       {field:'FieldValue',title:'二进制采集值',type:'int',width:110,require:true,align:'left'},
                       {field:'FaultReason',title:'故障原因',type:'string',width:110,require:true,align:'left'},
                       {field:'Level',title:'故障等级',type:'int',bind:{ key:'levelGroup',data:[]},width:120,require:true,align:'left'},
                       {field:'Resolution',title:'故障解决措施',type:'string',width:110,require:true,align:'left'},
                       {field:'UpdateTime',title:'更新时间',type:'datetime',width:110,align:'left'},
                       {field:'OperatorID',title:'更新用户',type:'string',width:120,align:'left'},
                       {field:'Memo',title:'备注',type:'string',width:120,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}